package utn.frba.matematicasuperior.modelo;

public class ParOrdenado implements Comparable<ParOrdenado> {

	/************************************************************/
	/************************ ATRIBUTOS *************************/
	/************************************************************/

	private Boolean selected;
	private Double x;
	private Double y;

	/************************************************************/
	/*********************** PROPIEDADES ************************/
	/************************************************************/

	public Boolean getSelected() {
		return selected;
	}

	public void setSelected(Boolean selected) {
		this.selected = selected;
	}

	public Double getX() {
		return x;
	}

	public void setX(Double x) {
		this.x = x;
	}

	public Double getY() {
		return y;
	}

	public void setY(Double y) {
		this.y = y;
	}

	/************************************************************/
	/*********************** CONSTRUCTOR ************************/
	/************************************************************/

	public ParOrdenado(Double x, Double y) {
		this.x = x;
		this.y = y;
	}

	/************************************************************/
	/******************** METODOS PUBLICOS **********************/
	/************************************************************/

	public int compareTo(ParOrdenado o) {
		if (this.x >= o.getX()) {
			if (this.x == o.getX())
				return 0;
			else
				return 1;
		} else
			return -1;
	}

}
